<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<form name="bookFrom" action="addBook" method="post">
	书名：<input name="bookName" type="text"/><br/>
	封面：<input name="picUrl" type="text"/><br/>
	价格：<input name="price" type="text"/><br/>
	<input type="submit" value="保存" />
</form>
<h6 style="color:red;"><c:out value="${MES}"/></h6>
<c:forEach var="book" items="${Books}" >
	书号：<c:out value="${book.uuid}" /><br/>
	书名：<c:out value="${book.bookName}" /><br/>
	封面：<c:out value="${book.picUrl}" /><br/>
	价格：<c:out value="${book.price}" /><br/>
	<a href="deleteBook?id=${book.uuid}">删除此书</a><br/>
	<a href="getBook?id=${book.uuid}">修改此书</a><br/>
</c:forEach>
<div>
<a href="BookShow?curPage=1">首页</a>
<c:choose>
<c:when test="${page.curPage==1}" >
<a href="BookShow?curPage=${page.curPage}">上页</a>
</c:when>
<c:otherwise>
<a href="BookShow?curPage=${page.curPage-1}">上页</a>
</c:otherwise>
</c:choose>

<c:choose>
<c:when test="${page.curPage==page.totalPageCount}" >
<a href="BookShow?curPage=${page.curPage}">下页</a>
</c:when>
<c:otherwise>
<a href="BookShow?curPage=${page.curPage+1}">下页</a>
</c:otherwise>
</c:choose>
<a href="BookShow?curPage=${page.totalPageCount}">尾页</a>
</div>
</body>
</html>